# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-file-rsync
_realname=File-RsyncP
pkgver=0.74
pkgrel=4
pkgdesc="Perl rsync client"
url="http://search.cpan.org/~cbarratt/File-RsyncP-0.68/"
arch="all"
license="GPL PerlArtistic"
depends="perl"
makedepends="perl-dev"
install=
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/C/CB/CBARRATT/$_realname-$pkgver.tar.gz
	perl-file-rsync-parallell-build-fix.patch
	"

builddir="$srcdir/$_realname-$pkgver"

build() {
	cd $builddir
	update_config_guess || return 1
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
	make config && make || return 1
}

package() {
	cd $builddir
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="0585c2f0b145875e9a13523d829b2ed9907e1e38c526f630a79a5b5dab36b6a9012375620ae92292e5977735c106bfab905bb121f56df5ca4494e1efcbd02cb6  File-RsyncP-0.74.tar.gz
1b7ddad9d13bcad01760048670545d893c6eb9c0ed3bbb33b80f9c1520aea682c98233efeafa2f6de12e4b86de5895c648a67dfb2402d9877b428df3b06da972  perl-file-rsync-parallell-build-fix.patch"
